import axios from "axios";
import getVersionData from "./getVersionData.js";
export default function (params,relGroup,callback, errFn) {
	let url =  window.api.config_host+'/resourceDate/resource/pro_act';
    let options = {
        method: "post",
        url: url,
        data: params,
        headers: {sessionId: getCookie("sessionId")}
    }
    axios(options).then(data => {
        if (data.status === 200 && data.data.returnCode === 1) {
            // callback && callback(data.data.data)
            callback && getVersionData(callback,relGroup)
        } else {
            errFn && errFn(data.data.msg);
        } 
    }).catch(err => {
        console.log(err);
        errFn && errFn();
    });
}
